<?php

use Drupal\shusy_city\Entity\ShusyCity;
use Drupal\shusy_city_video\Entity\ShusyCityVideo;

function shusy_city_video_shusy_city_video_add_page() {
  $e = new ShusyCityVideo();
  module_load_include('inc', 'shusy_city_video', 'shusy_city_video.forms');
  return drupal_get_form('shusy_city_video_shusy_city_video_entity_form', $e, 'add');
}

function shusy_city_video_shusy_city_video_view_page(ShusyCityVideo $e) {
  return entity_view($e->entityType(), [$e]);
}

function shusy_city_video_shusy_city_video_edit_page(ShusyCityVideo $e) {
  module_load_include('inc', 'shusy_city_video', 'shusy_city_video.forms');
  return drupal_get_form('shusy_city_video_shusy_city_video_entity_form', $e, 'edit');
}

function shusy_city_video_shusy_city_video_delete_page(ShusyCityVideo $e) {
  module_load_include('inc', 'shusy_city_video', 'shusy_city_video.forms');
  return drupal_get_form('shusy_city_video_shusy_city_video_delete_form', $e);
}

function shusy_city_video_city_add_page(ShusyCity $city) {
  $e = new ShusyCityVideo();
  $e->city_id = $city->id;
  module_load_include('inc', 'shusy_city_video', 'shusy_city_video.forms');
  return drupal_get_form('shusy_city_video_shusy_city_video_entity_form', $e, 'add');
}
